//
//  SubViewOutOfSelfAlsoCanBeFirstresponseView.m
//  SmartHomeSetting
//
//  Created by JM on 15/12/4.
//  Copyright © 2015年 dooya. All rights reserved.
//

#import "SubViewOutOfSelfAlsoCanBeFirstresponseView.h"
#import <UIKit/UIKit.h>
@implementation SubViewOutOfSelfAlsoCanBeFirstresponseView
- (UIView *) hitTest:(CGPoint) point withEvent:(UIEvent *)event {
    UIView * subView = [super hitTest:point withEvent:event];
    if (!subView && _canBeResponseButton){
        CGPoint pointInButton  = [self convertPoint:point toView:_canBeResponseButton];
        if (CGRectContainsPoint(_canBeResponseButton.bounds, pointInButton)) {
            return _canBeResponseButton;
        }
    }
    return subView;
}

@end
